#include "everymat.h"

/**
 * everymat_void:
 */
void everymat_void()
{ }

/**
 * everymat_pass_bool:
 * @arg:
 *
 * Returns: @arg
 */
gboolean everymat_pass_bool(gboolean arg) { return arg; }

/**
 * everymat_pass_gint8:
 * @arg:
 *
 * Returns: @arg
 */
gint8 everymat_pass_gint8(gint8 arg) { return arg; }

/**
 * everymat_pass_guint8:
 * @arg:
 *
 * Returns: @arg
 */
guint8 everymat_pass_guint8(guint8 arg) { return arg; }

/**
 * everymat_pass_gint16:
 * @arg:
 *
 * Returns: @arg
 */
gint16 everymat_pass_gint16(gint16 arg) { return arg; }

/**
 * everymat_pass_guint16:
 * @arg:
 *
 * Returns: @arg
 */
guint16 everymat_pass_guint16(guint16 arg) { return arg; }

/**
 * everymat_pass_gint32:
 * @arg:
 *
 * Returns: @arg
 */
gint32 everymat_pass_gint32(gint32 arg) { return arg; }

/**
 * everymat_pass_guint32:
 * @arg:
 *
 * Returns: @arg
 */
guint32 everymat_pass_guint32(guint32 arg) { return arg; }

/**
 * everymat_pass_gint64:
 * @arg:
 *
 * Returns: @arg
 */
gint64 everymat_pass_gint64(gint64 arg) { return arg; }

/**
 * everymat_pass_guint64:
 * @arg:
 *
 * Returns: @arg
 */
guint64 everymat_pass_guint64(guint64 arg) { return arg; }

/**
 * everymat_pass_gfloat:
 * @arg:
 *
 * Returns: @arg
 */
gfloat everymat_pass_gfloat(gfloat arg) { return arg; }

/**
 * everymat_pass_gdouble:
 * @arg:
 *
 * Returns: @arg
 */
gdouble everymat_pass_gdouble(gdouble arg) { return arg; }

/**
 * everymat_pass_string:
 * @arg: (transfer none):
 *
 * Returns: (transfer none): @arg
 */
char * everymat_pass_string(char *arg) { return arg; }

/**
 * everymat_pass_gobject:
 * @arg: (transfer none):
 *
 * Returns: (transfer none): @arg
 */
GObject * everymat_pass_gobject(GObject *arg) { return arg; }

/**
 * everymat_pass_gtype:
 * @arg:
 *
 * Returns: @arg
 */
GType everymat_pass_gtype(GType arg) { return arg; }

/**
 * everymat_pass_out_bool:
 * @arg:
 * @out: (out): set to @arg
 */
void everymat_pass_out_bool(gboolean arg, gboolean *out) { *out = arg; }

/**
 * everymat_pass_out_gint8:
 * @arg:
 * @out: (out): set to @arg
 */
void everymat_pass_out_gint8(gint8 arg, gint8 *out) { *out = arg; }

/**
 * everymat_pass_out_guint8:
 * @arg:
 * @out: (out): set to @arg
 */
void everymat_pass_out_guint8(guint8 arg, guint8 *out) { *out = arg; }

/**
 * everymat_pass_out_gint16:
 * @arg:
 * @out: (out): set to @arg
 */
void everymat_pass_out_gint16(gint16 arg, gint16 *out) { *out = arg; }

/**
 * everymat_pass_out_guint16:
 * @arg:
 * @out: (out): set to @arg
 */
void everymat_pass_out_guint16(guint16 arg, guint16 *out) { *out = arg; }

/**
 * everymat_pass_out_gint32:
 * @arg:
 * @out: (out): set to @arg
 */
void everymat_pass_out_gint32(gint32 arg, gint32 *out) { *out = arg; }

/**
 * everymat_pass_out_guint32:
 * @arg:
 * @out: (out): set to @arg
 */
void everymat_pass_out_guint32(guint32 arg, guint32 *out) { *out = arg; }

/**
 * everymat_pass_out_gint64:
 * @arg:
 * @out: (out): set to @arg
 */
void everymat_pass_out_gint64(gint64 arg, gint64 *out) { *out = arg; }

/**
 * everymat_pass_out_guint64:
 * @arg:
 * @out: (out): set to @arg
 */
void everymat_pass_out_guint64(guint64 arg, guint64 *out) { *out = arg; }

/**
 * everymat_pass_out_gfloat:
 * @arg:
 * @out: (out): set to @arg
 */
void everymat_pass_out_gfloat(gfloat arg, gfloat *out) { *out = arg; }

/**
 * everymat_pass_out_gdouble:
 * @arg:
 * @out: (out): set to @arg
 */
void everymat_pass_out_gdouble(gdouble arg, gdouble *out) { *out = arg; }

/**
 * everymat_pass_out_string:
 * @arg: (transfer none):
 * @out: (out) (transfer none): set to @arg
 */
void everymat_pass_out_string(char *arg, char **out) { *out = arg; }

/**
 * everymat_pass_out_gtype:
 * @arg:
 * @out: (out): set to @arg
 */
void everymat_pass_out_gtype(GType arg, GType *out) { *out = arg; }

/**
 * everymat_pass_out_gobject:
 * @arg: (transfer none):
 * @out: (out) (transfer none): set to @arg
 */
void everymat_pass_out_gobject(GObject * arg, GObject **out) { *out = arg; }

/**
 * everymat_pass_inout_bool:
 * @arg: (inout) (transfer none):
 */
void everymat_pass_inout_bool(gboolean *arg) { }

/**
 * everymat_pass_inout_gint8:
 * @arg: (inout) (transfer none):
 */
void everymat_pass_inout_gint8(gint8 *arg) { }

/**
 * everymat_pass_inout_guint8:
 * @arg: (inout) (transfer none):
 */
void everymat_pass_inout_guint8(guint8 *arg) { }

/**
 * everymat_pass_inout_gint16:
 * @arg: (inout) (transfer none):
 */
void everymat_pass_inout_gint16(gint16 *arg) { }

/**
 * everymat_pass_inout_guint16:
 * @arg: (inout) (transfer none):
 */
void everymat_pass_inout_guint16(guint16 *arg) { }

/**
 * everymat_pass_inout_gint32:
 * @arg: (inout) (transfer none):
 */
void everymat_pass_inout_gint32(gint32 *arg) { }

/**
 * everymat_pass_inout_guint32:
 * @arg: (inout) (transfer none):
 */
void everymat_pass_inout_guint32(guint32 *arg) { }

/**
 * everymat_pass_inout_gint64:
 * @arg: (inout) (transfer none):
 */
void everymat_pass_inout_gint64(gint64 *arg) { }

/**
 * everymat_pass_inout_guint64:
 * @arg: (inout) (transfer none):
 */
void everymat_pass_inout_guint64(guint64 *arg) { }

/**
 * everymat_pass_inout_gfloat:
 * @arg: (inout) (transfer none):
 */
void everymat_pass_inout_gfloat(gfloat *arg) { }

/**
 * everymat_pass_inout_gdouble:
 * @arg: (inout) (transfer none):
 */
void everymat_pass_inout_gdouble(gdouble *arg) { }

/**
 * everymat_pass_inout_string:
 * @arg: (inout) (transfer none):
 */
void everymat_pass_inout_string(char **arg) { }

/**
 * everymat_pass_inout_gtype:
 * @arg: (inout) (transfer none):
 */
void everymat_pass_inout_gtype(GType *arg) { }

/**
 * everymat_pass_inout_gobject:
 * @arg: (inout) (transfer none):
 */
void everymat_pass_inout_gobject(GObject **arg) { }

/**
 * everymat_prod:
 * @arg1:
 * @arg2:
 *
 * Returns: the product of @arg1 and @arg2
 */
gdouble everymat_prod(gdouble arg1, gdouble arg2) { return arg1*arg2; }

/**
 * everymat_weave:
 * @arg1:
 * @out2: (out): set to @arg4
 * @arg3:
 * @arg4:
 * @out5: (out): set to @arg1
 *
 * Returns: @arg3
 */
gdouble everymat_weave(gboolean arg1, gint32 *out2, gdouble arg3, gint32 arg4, gboolean *out5)
{
  *out5 = arg1;
  *out2 = arg4;
  return arg3;
}

static gint64 internalArray[] = { 1, 2, 3, 0 };

/**
 * everymat_get_fixed_array:
 *
 * Returns: (array fixed-size=3) (transfer none): some integers
 */
gint64 * everymat_get_fixed_array() { return internalArray; }

/**
 * everymat_get_zero_term_array:
 *
 * Returns: (array zero-terminated=1) (transfer none): some integers
 */
gint64 * everymat_get_zero_term_array() { return internalArray; }

/**
 * everymat_pass_array_bool:
 * @arg: (in) (array length=len) (transfer none): an array
 * @len: the length of the array input
 * @outlen: the length of the array output
 *
 * Returns: (array length=outlen) (transfer none): @arg
 */
gboolean * everymat_pass_array_bool(gboolean * arg, gint len, gint *outlen) { *outlen = len; return arg; }

/**
 * everymat_pass_array_gint8:
 * @arg: (in) (array length=len) (transfer none): an array
 * @len: the length of the array input
 * @outlen: the length of the array output
 *
 * Returns: (array length=outlen) (element-type gint8) (transfer none): @arg
 */
gint8 * everymat_pass_array_gint8(gint8 * arg, gint len, gint *outlen) { *outlen = len; return arg; }

/**
 * everymat_pass_array_guint8:
 * @arg: (in) (array length=len) (transfer none): an array
 * @len: the length of the array input
 * @outlen: the length of the array output
 *
 * Returns: (array length=outlen) (transfer none): @arg
 */
guint8 * everymat_pass_array_guint8(guint8 * arg, gint len, gint *outlen) { *outlen = len; return arg; }

/**
 * everymat_pass_array_gint16:
 * @arg: (in) (array length=len) (transfer none): an array
 * @len: the length of the array input
 * @outlen: the length of the array output
 *
 * Returns: (array length=outlen) (transfer none): @arg
 */
gint16 * everymat_pass_array_gint16(gint16 * arg, gint len, gint *outlen) { *outlen = len; return arg; }

/**
 * everymat_pass_array_guint16:
 * @arg: (in) (array length=len) (transfer none): an array
 * @len: the length of the array input
 * @outlen: the length of the array output
 *
 * Returns: (array length=outlen) (transfer none): @arg
 */
guint16 * everymat_pass_array_guint16(guint16 * arg, gint len, gint *outlen) { *outlen = len; return arg; }

/**
 * everymat_pass_array_gint32:
 * @arg: (in) (array length=len) (transfer none): an array
 * @len: the length of the array input
 * @outlen: the length of the array output
 *
 * Returns: (array length=outlen) (transfer none): @arg
 */
gint32 * everymat_pass_array_gint32(gint32 * arg, gint len, gint *outlen) { *outlen = len; return arg; }

/**
 * everymat_pass_array_guint32:
 * @arg: (in) (array length=len) (transfer none): an array
 * @len: the length of the array input
 * @outlen: the length of the array output
 *
 * Returns: (array length=outlen) (transfer none): @arg
 */
guint32 * everymat_pass_array_guint32(guint32 * arg, gint len, gint *outlen) { *outlen = len; return arg; }

/**
 * everymat_pass_array_gint64:
 * @arg: (in) (array length=len) (transfer none): an array
 * @len: the length of the array input
 * @outlen: the length of the array output
 *
 * Returns: (array length=outlen) (transfer none): @arg
 */
gint64 * everymat_pass_array_gint64(gint64 * arg, gint len, gint *outlen) { *outlen = len; return arg; }

/**
 * everymat_pass_array_guint64:
 * @arg: (in) (array length=len) (transfer none): an array
 * @len: the length of the array input
 * @outlen: the length of the array output
 *
 * Returns: (array length=outlen) (transfer none): @arg
 */
guint64 * everymat_pass_array_guint64(guint64 * arg, gint len, gint *outlen) { *outlen = len; return arg; }

/**
 * everymat_pass_array_gfloat:
 * @arg: (in) (array length=len) (transfer none): an array
 * @len: the length of the array input
 * @outlen: the length of the array output
 *
 * Returns: (array length=outlen) (transfer none): @arg
 */
gfloat * everymat_pass_array_gfloat(gfloat * arg, gint len, gint *outlen) { *outlen = len; return arg; }

/**
 * everymat_pass_array_gdouble:
 * @arg: (in) (array length=len) (transfer none): an array
 * @len: the length of the array input
 * @outlen: the length of the array output
 *
 * Returns: (array length=outlen) (transfer none): @arg
 */
gdouble * everymat_pass_array_gdouble(gdouble * arg, gint len, gint *outlen) { *outlen = len; return arg; }

/**
 * everymat_pass_array_string:
 * @arg: (in) (array length=len) (transfer none): an array
 * @len: the length of the array input
 * @outlen: the length of the array output
 *
 * Returns: (array length=outlen) (transfer none): @arg
 */
char ** everymat_pass_array_string(char **arg, gint len, gint *outlen) { *outlen = len; return arg; }

/**
 * everymat_pass_array_gtype:
 * @arg: (in) (array length=len) (transfer none): an array
 * @len: the length of the array input
 * @outlen: the length of the array output
 *
 * Returns: (array length=outlen) (transfer none): @arg
 */
GType * everymat_pass_array_gtype(GType * arg, gint len, gint *outlen) { *outlen = len; return arg; }

/**
 * everymat_pass_garray_bool:
 * @arg: (in) (element-type gboolean) (transfer none): an array
 *
 * Returns: (element-type gboolean) (transfer none): @arg
 */
GArray * everymat_pass_garray_bool(GArray *arg) { return arg; }

/**
 * everymat_pass_garray_gint8:
 * @arg: (in) (element-type gint8) (transfer none): an array
 *
 * Returns: (element-type gint8) (transfer none): @arg
 */
GArray * everymat_pass_garray_gint8(GArray *arg) { return arg; }

/**
 * everymat_pass_garray_guint8:
 * @arg: (in) (element-type guint8) (transfer none): an array
 *
 * Returns: (element-type guint8) (transfer none): @arg
 */
GArray * everymat_pass_garray_guint8(GArray *arg) { return arg; }

/**
 * everymat_pass_garray_gint16:
 * @arg: (in) (element-type gint16) (transfer none): an array
 *
 * Returns: (element-type gint16) (transfer none): @arg
 */
GArray * everymat_pass_garray_gint16(GArray *arg) { return arg; }

/**
 * everymat_pass_garray_guint16:
 * @arg: (in) (element-type guint16) (transfer none): an array
 *
 * Returns: (element-type guint16) (transfer none): @arg
 */
GArray * everymat_pass_garray_guint16(GArray *arg) { return arg; }

/**
 * everymat_pass_garray_gint32:
 * @arg: (in) (element-type gint32) (transfer none): an array
 *
 * Returns: (element-type gint32) (transfer none): @arg
 */
GArray * everymat_pass_garray_gint32(GArray *arg) { return arg; }

/**
 * everymat_pass_garray_guint32:
 * @arg: (in) (element-type guint32) (transfer none): an array
 *
 * Returns: (element-type guint32) (transfer none): @arg
 */
GArray * everymat_pass_garray_guint32(GArray *arg) { return arg; }

/**
 * everymat_pass_garray_gint64:
 * @arg: (in) (element-type gint64) (transfer none): an array
 *
 * Returns: (element-type gint64) (transfer none): @arg
 */
GArray * everymat_pass_garray_gint64(GArray *arg) { return arg; }

/**
 * everymat_pass_garray_guint64:
 * @arg: (in) (element-type guint64) (transfer none): an array
 *
 * Returns: (element-type guint64) (transfer none): @arg
 */
GArray * everymat_pass_garray_guint64(GArray *arg) { return arg; }

/**
 * everymat_pass_garray_gfloat:
 * @arg: (in) (element-type gfloat) (transfer none): an array
 *
 * Returns: (element-type gfloat) (transfer none): @arg
 */
GArray * everymat_pass_garray_gfloat(GArray *arg) { return arg; }

/**
 * everymat_pass_garray_gdouble:
 * @arg: (in) (element-type gdouble) (transfer none): an array
 *
 * Returns: (element-type gdouble) (transfer none): @arg
 */
GArray * everymat_pass_garray_gdouble(GArray *arg) { return arg; }

/**
 * everymat_pass_garray_string:
 * @arg: (in) (element-type gchar*) (transfer none): an array
 *
 * Returns: (element-type gchar*) (transfer none): @arg
 */
GArray * everymat_pass_garray_string(GArray *arg) { return arg; }

/**
 * everymat_pass_garray_gtype:
 * @arg: (in) (element-type GType) (transfer none): an array
 *
 * Returns: (element-type GType) (transfer none): @arg
 */
GArray * everymat_pass_garray_gtype(GArray *arg) { return arg; }

/**
 * everymat_pass_glist_bool:
 * @arg: (in) (element-type gboolean) (transfer none): an array
 *
 * Returns: (element-type gboolean) (transfer none): @arg
 */
GList * everymat_pass_glist_bool(GList *arg) { return arg; }

/**
 * everymat_pass_glist_gint8:
 * @arg: (in) (element-type gint8) (transfer none): an array
 *
 * Returns: (element-type gint8) (transfer none): @arg
 */
GList * everymat_pass_glist_gint8(GList *arg) { return arg; }

/**
 * everymat_pass_glist_guint8:
 * @arg: (in) (element-type guint8) (transfer none): an array
 *
 * Returns: (element-type guint8) (transfer none): @arg
 */
GList * everymat_pass_glist_guint8(GList *arg) { return arg; }

/**
 * everymat_pass_glist_gint16:
 * @arg: (in) (element-type gint16) (transfer none): an array
 *
 * Returns: (element-type gint16) (transfer none): @arg
 */
GList * everymat_pass_glist_gint16(GList *arg) { return arg; }

/**
 * everymat_pass_glist_guint16:
 * @arg: (in) (element-type guint16) (transfer none): an array
 *
 * Returns: (element-type guint16) (transfer none): @arg
 */
GList * everymat_pass_glist_guint16(GList *arg) { return arg; }

/**
 * everymat_pass_glist_gint32:
 * @arg: (in) (element-type gint32) (transfer none): an array
 *
 * Returns: (element-type gint32) (transfer none): @arg
 */
GList * everymat_pass_glist_gint32(GList *arg) { return arg; }

/**
 * everymat_pass_glist_guint32:
 * @arg: (in) (element-type guint32) (transfer none): an array
 *
 * Returns: (element-type guint32) (transfer none): @arg
 */
GList * everymat_pass_glist_guint32(GList *arg) { return arg; }

/**
 * everymat_pass_glist_gint64:
 * @arg: (in) (element-type gint64) (transfer none): an array
 *
 * Returns: (element-type gint64) (transfer none): @arg
 */
GList * everymat_pass_glist_gint64(GList *arg) { return arg; }

/**
 * everymat_pass_glist_guint64:
 * @arg: (in) (element-type guint64) (transfer none): an array
 *
 * Returns: (element-type guint64) (transfer none): @arg
 */
GList * everymat_pass_glist_guint64(GList *arg) { return arg; }

/**
 * everymat_pass_glist_gfloat:
 * @arg: (in) (element-type gfloat) (transfer none): an array
 *
 * Returns: (element-type gfloat) (transfer none): @arg
 */
GList * everymat_pass_glist_gfloat(GList *arg) { return arg; }

/**
 * everymat_pass_glist_gdouble:
 * @arg: (in) (element-type gdouble) (transfer none): an array
 *
 * Returns: (element-type gdouble) (transfer none): @arg
 */
GList * everymat_pass_glist_gdouble(GList *arg) { return arg; }

/**
 * everymat_pass_glist_string:
 * @arg: (in) (element-type gchar*) (transfer none): an array
 *
 * Returns: (element-type gchar*) (transfer none): @arg
 */
GList * everymat_pass_glist_string(GList *arg) { return arg; }

/**
 * everymat_pass_glist_gtype:
 * @arg: (in) (element-type GType) (transfer none): an array
 *
 * Returns: (element-type GType) (transfer none): @arg
 */
GList * everymat_pass_glist_gtype(GList *arg) { return arg; }

/**
 * everymat_pass_gslist_bool:
 * @arg: (in) (element-type gboolean) (transfer none): an array
 *
 * Returns: (element-type gboolean) (transfer none): @arg
 */
GSList * everymat_pass_gslist_bool(GSList *arg) { return arg; }

/**
 * everymat_pass_gslist_gint8:
 * @arg: (in) (element-type gint8) (transfer none): an array
 *
 * Returns: (element-type gint8) (transfer none): @arg
 */
GSList * everymat_pass_gslist_gint8(GSList *arg) { return arg; }

/**
 * everymat_pass_gslist_guint8:
 * @arg: (in) (element-type guint8) (transfer none): an array
 *
 * Returns: (element-type guint8) (transfer none): @arg
 */
GSList * everymat_pass_gslist_guint8(GSList *arg) { return arg; }

/**
 * everymat_pass_gslist_gint16:
 * @arg: (in) (element-type gint16) (transfer none): an array
 *
 * Returns: (element-type gint16) (transfer none): @arg
 */
GSList * everymat_pass_gslist_gint16(GSList *arg) { return arg; }

/**
 * everymat_pass_gslist_guint16:
 * @arg: (in) (element-type guint16) (transfer none): an array
 *
 * Returns: (element-type guint16) (transfer none): @arg
 */
GSList * everymat_pass_gslist_guint16(GSList *arg) { return arg; }

/**
 * everymat_pass_gslist_gint32:
 * @arg: (in) (element-type gint32) (transfer none): an array
 *
 * Returns: (element-type gint32) (transfer none): @arg
 */
GSList * everymat_pass_gslist_gint32(GSList *arg) { return arg; }

/**
 * everymat_pass_gslist_guint32:
 * @arg: (in) (element-type guint32) (transfer none): an array
 *
 * Returns: (element-type guint32) (transfer none): @arg
 */
GSList * everymat_pass_gslist_guint32(GSList *arg) { return arg; }

/**
 * everymat_pass_gslist_gint64:
 * @arg: (in) (element-type gint64) (transfer none): an array
 *
 * Returns: (element-type gint64) (transfer none): @arg
 */
GSList * everymat_pass_gslist_gint64(GSList *arg) { return arg; }

/**
 * everymat_pass_gslist_guint64:
 * @arg: (in) (element-type guint64) (transfer none): an array
 *
 * Returns: (element-type guint64) (transfer none): @arg
 */
GSList * everymat_pass_gslist_guint64(GSList *arg) { return arg; }

/**
 * everymat_pass_gslist_gfloat:
 * @arg: (in) (element-type gfloat) (transfer none): an array
 *
 * Returns: (element-type gfloat) (transfer none): @arg
 */
GSList * everymat_pass_gslist_gfloat(GSList *arg) { return arg; }

/**
 * everymat_pass_gslist_gdouble:
 * @arg: (in) (element-type gdouble) (transfer none): an array
 *
 * Returns: (element-type gdouble) (transfer none): @arg
 */
GSList * everymat_pass_gslist_gdouble(GSList *arg) { return arg; }

/**
 * everymat_pass_gslist_string:
 * @arg: (in) (element-type gchar*) (transfer none): an array
 *
 * Returns: (element-type gchar*) (transfer none): @arg
 */
GSList * everymat_pass_gslist_string(GSList *arg) { return arg; }

/**
 * everymat_pass_gslist_gtype:
 * @arg: (in) (element-type GType) (transfer none): an array
 *
 * Returns: (element-type GType) (transfer none): @arg
 */
GSList * everymat_pass_gslist_gtype(GSList *arg) { return arg; }

/********************* DOUBLE:DOUBLE C MARSHALER ************************/

#define g_marshal_value_peek_double(v)   g_value_get_double (v)
void
g_cclosure_user_marshal_DOUBLE__DOUBLE (GClosure     *closure,
                                        GValue       *return_value G_GNUC_UNUSED,
                                        guint         n_param_values,
                                        const GValue *param_values,
                                        gpointer      invocation_hint G_GNUC_UNUSED,
                                        gpointer      marshal_data)
{
  typedef gdouble (*GMarshalFunc_DOUBLE__DOUBLE) (gpointer     data1,
                                                  gdouble      arg_1,
                                                  gpointer     data2);
  register GMarshalFunc_DOUBLE__DOUBLE callback;
  register GCClosure *cc = (GCClosure*) closure;
  register gpointer data1, data2;
  gdouble v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 2);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }
  callback = (GMarshalFunc_DOUBLE__DOUBLE) (marshal_data ? marshal_data : cc->callback);

  v_return = callback (data1,
                       g_marshal_value_peek_double (param_values + 1),
                       data2);

  g_value_set_double (return_value, v_return);
}

/********************* NOISY ************************/

G_DEFINE_TYPE(EverymatNoisy, everymat_noisy, G_TYPE_OBJECT);

static void everymat_noisy_dispose(GObject *obj)
{
  g_debug("Disposing Noisy %ld", obj);
}

static void everymat_noisy_class_init(EverymatNoisyClass *klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
  gobject_class->dispose = everymat_noisy_dispose;
}

static void everymat_noisy_init (EverymatNoisy *self)
{
  g_debug("Initializing Noisy %ld", self);
}

/********************* THING ************************/

G_DEFINE_TYPE(EverymatThing, everymat_thing, G_TYPE_OBJECT);

enum
{
  PROP_0,
  PROP_BOOL,
  PROP_CHAR,
  PROP_UCHAR,
  PROP_INT,
  PROP_UINT,
  PROP_LONG,
  PROP_ULONG,
  PROP_INT64,
  PROP_UINT64,
  PROP_FLOAT,
  PROP_DOUBLE,
  PROP_STRING,
  PROP_GTYPE,
  PROP_OBJECT,
};

static void everymat_thing_constructed (GObject *object)
{
  G_OBJECT_CLASS(everymat_thing_parent_class)->constructed(object);
  EVERYMAT_THING_CLASS(g_type_class_peek(EVERYMAT_TYPE_THING))->count++;
}

static void everymat_thing_finalize (GObject *object)
{
  EVERYMAT_THING_CLASS(g_type_class_peek(EVERYMAT_TYPE_THING))->count--;
  G_OBJECT_CLASS(everymat_thing_parent_class)->finalize(object);
}

static void everymat_thing_dispose (GObject *object)
{
  EverymatThing *self = EVERYMAT_THING(object);
  G_OBJECT_CLASS(everymat_thing_parent_class)->dispose(object);
  if (self->prop_object) g_object_unref(self->prop_object);
  self->prop_object = NULL;
  if (self->prop_string) g_free(self->prop_string);
  self->prop_string = NULL;
}

static void everymat_thing_set_property(GObject *object, guint prop_id,
                                        const GValue *value, GParamSpec *pspec)
{
  EverymatThing *self = EVERYMAT_THING(object);
  switch (prop_id)
  {
    case PROP_BOOL:
      self->prop_bool = g_value_get_boolean(value);
      break;
    case PROP_CHAR:
      self->prop_char = g_value_get_char(value);
      break;
    case PROP_UCHAR:
      self->prop_uchar = g_value_get_uchar(value);
      break;
    case PROP_INT:
      self->prop_int = g_value_get_int(value);
      break;
    case PROP_UINT:
      self->prop_uint = g_value_get_uint(value);
      break;
    case PROP_LONG:
      self->prop_long = g_value_get_long(value);
      break;
    case PROP_ULONG:
      self->prop_ulong = g_value_get_ulong(value);
      break;
    case PROP_INT64:
      self->prop_int64 = g_value_get_int64(value);
      break;
    case PROP_UINT64:
      self->prop_uint64 = g_value_get_uint64(value);
      break;
    case PROP_FLOAT:
      self->prop_float = g_value_get_float(value);
      break;
    case PROP_DOUBLE:
      self->prop_double = g_value_get_double(value);
      break;
    case PROP_STRING:
      if (self->prop_string) g_free(self->prop_string);
      self->prop_string = g_value_dup_string(value);
      break;
    case PROP_GTYPE:
      self->prop_gtype = g_value_get_gtype(value);
      break;
    case PROP_OBJECT:
      if (self->prop_object) g_object_unref(self->prop_object);
      self->prop_object = g_value_dup_object(value);
      break;
    default:
      // Unknown property
      G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
      break;
  }
}

static void everymat_thing_get_property(GObject *object, guint prop_id,
                                        GValue *value, GParamSpec *pspec)
{
  EverymatThing *self = EVERYMAT_THING(object);
  switch (prop_id)
  {
    case PROP_BOOL:
      g_value_set_boolean(value, self->prop_bool);
      break;
    case PROP_CHAR:
      g_value_set_char(value, self->prop_char);
      break;
    case PROP_UCHAR:
      g_value_set_uchar(value, self->prop_uchar);
      break;
    case PROP_INT:
      g_value_set_int(value, self->prop_int);
      break;
    case PROP_UINT:
      g_value_set_uint(value, self->prop_uint);
      break;
    case PROP_LONG:
      g_value_set_long(value, self->prop_long);
      break;
    case PROP_ULONG:
      g_value_set_ulong(value, self->prop_ulong);
      break;
    case PROP_INT64:
      g_value_set_int64(value, self->prop_int64);
      break;
    case PROP_UINT64:
      g_value_set_uint64(value, self->prop_uint64);
      break;
    case PROP_FLOAT:
      g_value_set_float(value, self->prop_float);
      break;
    case PROP_DOUBLE:
      g_value_set_double(value, self->prop_double);
      break;
    case PROP_GTYPE:
      g_value_set_gtype(value, self->prop_gtype);
      break;
    case PROP_STRING:
      g_value_set_string(value, self->prop_string);
      break;
    case PROP_OBJECT:
      g_value_set_object(value, self->prop_object);
      break;
    default:
      // Unknown property
      G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
      break;
  }
}

static void everymat_thing_class_init(EverymatThingClass *klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
  GParamSpec *pspec;

  gobject_class->constructed = everymat_thing_constructed;
  gobject_class->dispose = everymat_thing_dispose;
  gobject_class->finalize = everymat_thing_finalize;
  gobject_class->set_property = everymat_thing_set_property;
  gobject_class->get_property = everymat_thing_get_property;

/**
 * EverymatThing:prop_bool:
 */
  pspec = g_param_spec_boolean("prop_bool", "boolean", "a boolean",
                            FALSE,
                            G_PARAM_READWRITE | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
  g_object_class_install_property(gobject_class, PROP_BOOL, pspec);

/**
 * EverymatThing:prop_char:
 */
  pspec = g_param_spec_char("prop_char", "char", "a char",
                            G_MININT8, G_MAXINT8, '\n',
                            G_PARAM_READWRITE | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
  g_object_class_install_property(gobject_class, PROP_CHAR, pspec);

/**
 * EverymatThing:prop_uchar:
 */
  pspec = g_param_spec_uchar("prop_uchar", "uchar", "a uchar",
                            0, G_MAXUINT8, '\n',
                            G_PARAM_READWRITE | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
  g_object_class_install_property(gobject_class, PROP_UCHAR, pspec);

/**
 * EverymatThing:prop_int:
 */
  pspec = g_param_spec_int("prop_int", "int", "an int",
                            G_MININT, G_MAXINT, 5,
                            G_PARAM_READWRITE | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
  g_object_class_install_property(gobject_class, PROP_INT, pspec);

/**
 * EverymatThing:prop_uint:
 */
  pspec = g_param_spec_uint("prop_uint", "uint", "a uint",
                            0, G_MAXUINT, 0,
                            G_PARAM_READWRITE | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
  g_object_class_install_property(gobject_class, PROP_UINT, pspec);

/**
 * EverymatThing:prop_long:
 */
  pspec = g_param_spec_long("prop_long", "long", "a long",
                            G_MINLONG, G_MAXLONG, 0,
                            G_PARAM_READWRITE | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
  g_object_class_install_property(gobject_class, PROP_LONG, pspec);

/**
 * EverymatThing:prop_ulong:
 */
  pspec = g_param_spec_ulong("prop_ulong", "ulong", "a ulong",
                            0, G_MAXULONG, 0,
                            G_PARAM_READWRITE | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
  g_object_class_install_property(gobject_class, PROP_ULONG, pspec);

/**
 * EverymatThing:prop_int64:
 */
  pspec = g_param_spec_int64("prop_int64", "int64", "a  64-bit int",
                            G_MININT64, G_MAXINT64, 0,
                            G_PARAM_READWRITE | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
  g_object_class_install_property(gobject_class, PROP_INT64, pspec);

/**
 * EverymatThing:prop_uint64:
 */
  pspec = g_param_spec_uint64("prop_uint64", "uint64", "a  64-bit uint",
                            0, G_MAXUINT64, 0,
                            G_PARAM_READWRITE | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
  g_object_class_install_property(gobject_class, PROP_UINT64, pspec);

/**
 * EverymatThing:prop_float:
 */
  pspec = g_param_spec_float("prop_float", "float", "a float",
                            -G_MAXFLOAT, G_MAXFLOAT, 0,
                            G_PARAM_READWRITE | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
  g_object_class_install_property(gobject_class, PROP_FLOAT, pspec);

/**
 * EverymatThing:prop_double:
 */
  pspec = g_param_spec_double("prop_double", "double", "a double",
                            -G_MAXDOUBLE, G_MAXDOUBLE, 0,
                            G_PARAM_READWRITE | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
  g_object_class_install_property(gobject_class, PROP_DOUBLE, pspec);

/**
 * EverymatThing:prop_string:
 */
  pspec = g_param_spec_string("prop_string", "string", "a string",
                            NULL,
                            G_PARAM_READWRITE | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
  g_object_class_install_property(gobject_class, PROP_STRING, pspec);

/**
 * EverymatThing:prop_gtype:
 */
  pspec = g_param_spec_gtype("prop_gtype", "gtype", "a GType",
                            G_TYPE_OBJECT,
                            G_PARAM_READWRITE | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
  g_object_class_install_property(gobject_class, PROP_GTYPE, pspec);

/**
 * EverymatThing:prop_object:
 */
  pspec = g_param_spec_object("prop_object", "object", "a GObject",
                            G_TYPE_OBJECT,
                            G_PARAM_READWRITE | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
  g_object_class_install_property(gobject_class, PROP_OBJECT, pspec);

/**
 * EverymatThing::thingy:
 * @obj: an #EverymatThing
 * @arg: a double
 *
 * A test signal.
 *
 * Returns: the value of some computation
 */
  klass->thingy = g_signal_new("thingy",
                               EVERYMAT_TYPE_THING, G_SIGNAL_ACTION, 0,
                               NULL, NULL,
                               g_cclosure_user_marshal_DOUBLE__DOUBLE,
                               G_TYPE_DOUBLE, 1, G_TYPE_DOUBLE);

}

static void everymat_thing_init (EverymatThing *self)
{
}

/**
 * everymat_thing_void:
 * @obj: a #EverymatThing
 */
void everymat_thing_void(EverymatThing *obj)
{
  g_return_if_fail(EVERYMAT_IS_THING(obj));
}

/**
 * everymat_thing_zero:
 * @obj: a #EverymatThing
 *
 * Returns: the #EverymatThing:prop_int
 */
gint everymat_thing_zero(EverymatThing *obj)
{
  g_return_val_if_fail(EVERYMAT_IS_THING(obj), 0);
  return obj->prop_int;
}

/**
 * everymat_thing_one:
 * @obj: a #EverymatThing
 * @arg1:
 *
 * Returns: @arg1 * #EverymatThing:prop_int
 */
gdouble everymat_thing_one(EverymatThing *obj, gdouble arg1)
{
  g_return_val_if_fail(EVERYMAT_IS_THING(obj), 0);
  return arg1 * obj->prop_int;
}

/**
 * everymat_thing_two:
 * @obj: a #EverymatThing
 * @arg1:
 * @arg2:
 *
 * Returns: @arg1 * @arg2
 */
gdouble everymat_thing_two(EverymatThing *obj, gdouble arg1, gint arg2)
{
  g_return_val_if_fail(EVERYMAT_IS_THING(obj), 0);
  return arg1 * arg2;
}

/**
 * everymat_thing_pass_out_gint32:
 * @obj: a #EverymatThing
 * @arg:
 * @out: (out):
 */
void everymat_thing_pass_out_gint32(EverymatThing *obj, gint32 arg, gint32 *out)
{
  g_return_if_fail(EVERYMAT_IS_THING(obj));
  *out = arg;
}

/**
 * everymat_thing_weave:
 * @obj: a #EverymatThing
 * @arg1:
 * @out2: (out): set to @arg4
 * @arg3:
 * @arg4:
 * @out5: (out): set to @arg1
 *
 * Returns: @arg3
 */
gdouble everymat_thing_weave(EverymatThing *obj, gboolean arg1, gint32 *out2, gdouble arg3, gint32 arg4, gboolean *out5)
{
  g_return_val_if_fail(EVERYMAT_IS_THING(obj), 0);
  *out5 = arg1;
  *out2 = arg4;
  return arg3;
}

/**
 * everymat_thing_emit:
 * @obj:
 * @arg: an argument for the signal
 *
 * Have @obj emit the thingy signal.
 *
 * Returns: the signal return value
 */
gdouble everymat_thing_emit(EverymatThing *obj, gdouble arg)
{
  gdouble ret;
  g_return_val_if_fail(EVERYMAT_IS_THING(obj), 0);
  g_signal_emit(obj, EVERYMAT_THING_GET_CLASS(obj)->thingy, 0, arg, &ret);
  return ret;
}

/**
 * everymat_thing_get_count:
 *
 * Returns: the number of currently existing #Thing objects
 */
guint everymat_thing_get_count()
{
  EverymatThingClass *klass = g_type_class_peek(EVERYMAT_TYPE_THING);
  if (klass) return klass->count;
  else return 0;
}

/**
 * everymat_thing_make_subthing:
 * @obj: an #EverymatThing
 *
 * Returns: (transfer full): a new #EverymatSubthing
 */
GObject *everymat_thing_make_subthing(EverymatThing *obj)
{
  return g_object_new(EVERYMAT_TYPE_SUBTHING, NULL);
}

/**
 * everymat_thing_make_stored_subthing:
 * @obj: an #EverymatThing
 *
 * Returns: (transfer none): a new #EverymatSubthing stored in @obj
 */
GObject *everymat_thing_make_stored_subthing(EverymatThing *obj)
{
  GObject *ret;
  g_return_val_if_fail(EVERYMAT_IS_THING(obj), NULL);
  ret = g_object_new(EVERYMAT_TYPE_SUBTHING, NULL);
  if (obj->prop_object) g_object_unref(obj->prop_object);
  obj->prop_object = ret;
  return ret;
}

/**
 * everymat_thing_receive_object:
 * @thing: an #EverymatThing
 * @obj: (transfer full): a #GObject to store in @thing
 * @junk: (allow-none) (transfer none): unused
 */
void everymat_thing_receive_object(EverymatThing *thing, GObject *obj, GObject *junk)
{
  g_return_if_fail(EVERYMAT_IS_THING(thing));
  g_return_if_fail(G_IS_OBJECT(obj));
  if (thing->prop_object) g_object_unref(thing->prop_object);
  thing->prop_object = obj;
}

/**
 * everymat_thing_dup_object:
 * @thing: an #EverymatThing
 * @obj: (transfer none): a #GObject to store in @thing
 * @junk: (allow-none) (transfer none): unused
 */
void everymat_thing_dup_object(EverymatThing *thing, GObject *obj, GObject *junk)
{
  g_return_if_fail(EVERYMAT_IS_THING(thing));
  g_return_if_fail(G_IS_OBJECT(obj));
  if (thing->prop_object) g_object_unref(thing->prop_object);
  thing->prop_object = obj;
  g_object_ref(obj);
}


/********************* SUBTHING ************************/

G_DEFINE_TYPE(EverymatSubthing, everymat_subthing, EVERYMAT_TYPE_THING);

static void everymat_subthing_class_init(EverymatSubthingClass *klass)
{
}

static void everymat_subthing_init (EverymatSubthing *self)
{
}

/********************* BOXTHING ************************/

static guint boxthing_count = 0;

G_DEFINE_BOXED_TYPE(EverymatBoxthing, everymat_boxthing,
                    everymat_boxthing_copy, everymat_boxthing_free);

/**
 * everymat_boxthing_new:
 *
 * Returns: (transfer full): a new #EverymatBoxthing
 */
EverymatBoxthing *everymat_boxthing_new()
{
  EverymatBoxthing *ret = g_new0(EverymatBoxthing, 1);
  boxthing_count++;
  g_debug("evermat_boxthing_new --> 0x%lx", ret);
  return ret;
}

void everymat_boxthing_free(EverymatBoxthing *thing)
{
  g_return_if_fail(thing != NULL);
  boxthing_count--;
  g_debug("everymat_boxthing_free(0x%lx)", thing);
  g_free(thing);
}

/**
 * everymat_boxthing_copy: 
 * @thing: (transfer none):
 *
 * Returns: (transfer full): copy of @thing
 */
EverymatBoxthing *everymat_boxthing_copy(EverymatBoxthing *thing)
{
  EverymatBoxthing *ret;
  g_return_val_if_fail(thing != NULL, NULL);
  ret = everymat_boxthing_new();  // Increments count
  ret->value = thing->value;
  g_debug("everymat_boxthing_copy(0x%ld) --> 0x%lx)", thing, ret);
  return ret;
}

/**
 * everymat_boxthing_count:
 *
 * Returns: number of active #EvermatBoxthing structs
 */
guint everymat_boxthing_count() { return boxthing_count; }

/**
 * everymat_boxthing_set:
 * @thing:
 * @val:
 */
void everymat_boxthing_set(EverymatBoxthing *thing, gint val)
{
  g_return_if_fail(thing != NULL);
  thing->value = val;
}

/**
 * everymat_boxthing_get:
 * @thing:
 *
 * Returns: value of @thing
 */
gint everymat_boxthing_get(EverymatBoxthing *thing)
{
  g_return_val_if_fail(thing != NULL, 0);
  return thing->value;
}
